<template>
  <div class="verifySwipe">
    <div class="slide-box">
      <i class="slide" :class="isAnimate ? 'animate' :''" :style="'width:'+(disX )+'px'"></i>
      <i :class="rangeStatus? 'success' :''">{{text}}</i>
    </div>
    <div @touchstart="rangeMove" @mousedown="rangeMove" :class="{'animate':isAnimate ,'success icondui ': rangeStatus,'iconxiangyou':!rangeStatus}" class="slide-button iconfont "></div>
  </div>
</template>

<script lang="ts">
import verifySwipe from "./verifySwipe";
export default verifySwipe;
</script>

<style lang="scss" scoped>
.verifySwipe {
  position: relative;

  .slide-box {
    width: 100%;
    height: 40px;
    background: #eee;
    border-radius: 40px;
    i {
      display: block;
      height: 40px;
      width: 100%;
      line-height: 40px;
      position: absolute;
      font-style: normal;
      text-align: center;
      border-radius: 40px;

      user-select: none;
      touch-action: none;
      &.slide {
        background: $green;
        padding-left: 40px;;
      }
      &.success{
          color: #fff;
      }
    }
  }

  .slide-button {
    top: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 40px;
    background: #fff;
    position: absolute;
    font-size: 16px;
    box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
    &.success{
        color: $green;
        font-weight: bold;
        
    }

  }
  .animate {
    transition: 0.1s all;
  }
}
</style>